package com.example.bes014.web.demo.custom;

import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class CustomInterceptor implements HandlerInterceptor {

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        System.out.println("拦截器执行：请求路径 - " + request.getRequestURI());
        return true; // 返回 true 继续处理请求，返回 false 拦截请求
    }
}
